<?php
$route->any('login', 'AuthController@login')->name('admin.user.login');
$route->any('test', 'TestController@index');

$route->group(['middleware' => 'api.auth'], function ($route) {

    //管理员
    $route->get('admin/index', 'AdminController@index')->name('admin.admin.index');
    $route->get('logout', 'AdminController@logout')->name('admin.admin.logout');
    $route->post('admin/store', 'AdminController@store')->name('admin.admin.store');
    $route->post('password/update', 'AdminController@updatePwd')->name('admin.password.update');
    $route->any('permission', 'AuthController@permission');


    //user-tag
    $route->get('user/tag/index', 'UserTagController@index');
    $route->get('user/tag/info', 'UserTagController@info');
    $route->post('user/tag/store', 'UserTagController@store');
    $route->post('user/tag/destroy', 'UserTagController@destroy');

    //user
    $route->any('user/index', 'UserController@index');
    $route->any('user/store', 'UserController@store');
    $route->any('user/assign/virtual', 'UserController@assignVirtual');
    $route->any('user/restore/virtual', 'UserController@restoreVirtual');
    $route->any('user/info', 'UserController@info');
    $route->any('user/set/tag', 'UserController@setTag');
    $route->any('user/black', 'UserController@black');
    $route->any('user/balance', 'BalanceController@index');
    $route->any('user/read/log', 'UserReadLogController@index');
    $route->any('user/read/tag', 'UserReadLogController@tag');

    //category
    $route->any('category/index', 'CategoryController@index');
    $route->any('category/all', 'CategoryController@all');
    $route->any('category/edit/status', 'CategoryController@editStatus');
    $route->any('category/store', 'CategoryController@store');
    $route->any('category/info', 'CategoryController@info');
    $route->any('category/store', 'CategoryController@store');
    $route->any('category/destroy', 'CategoryController@destroy');

    //circle
    $route->any('circle/index', 'CircleController@index');
    $route->any('circle/store', 'CircleController@store');
    $route->any('activity/publish/lottery', 'CircleController@publishActivityLottery');
    $route->any('activity/push/start', 'CircleController@pushActivityStartTemplate');
    $route->any('circle/info', 'CircleController@info');
    $route->any('circle/set/category', 'CircleController@setCategory');
    $route->any('circle/destroy', 'CircleController@destroy');
    $route->any('circle/edit/status', 'CircleController@editStatus');
    $route->any('circle/store/activity', 'CircleController@storeActivity');

    //circleCategory
    $route->get('circle/category/index', 'CircleCategoryController@index');
    $route->get('circle/category/info', 'CircleCategoryController@info');
    $route->post('circle/category/store', 'CircleCategoryController@store');
    $route->post('circle/category/destroy', 'CircleCategoryController@destroy');
    $route->post('circle/category/edit/status', 'CircleCategoryController@editStatus');

    //article
    $route->any('article/index', 'ArticleController@index');
    $route->any('article/assign/user', 'ArticleController@assignUser');
    $route->any('article/destroy', 'ArticleController@destroy');
    $route->any('article/choice/store', 'ArticleController@choice_store');
    $route->post('article/edit/status', 'ArticleController@editStatus');
    $route->any('article/set/tag', 'ArticleController@setTag');
    $route->any('article/restore', 'ArticleController@restore');
    $route->any('article/circle/store', 'ArticleController@circleStore');

    //article - tag
    $route->get('article/tag/index', 'ArticleTagController@index');
    $route->get('article/tag/info', 'ArticleTagController@info');
    $route->post('article/tag/store', 'ArticleTagController@store');
    $route->post('article/tag/destroy', 'ArticleTagController@destroy');

    //animal
    $route->any('animal/index', 'AnimalController@index');
    $route->any('animal/category', 'CategoryController@index');
    $route->any('animal/destroy', 'AnimalController@destroy');
    $route->any('animal/edit/status', 'AnimalController@editStatus');

    //keyword
    $route->any('search/index', 'SearchController@index');
    $route->any('search/statistics', 'SearchController@statistics');

    //report
    $route->any('report/index', 'ReportController@index');
    $route->any('report/store', 'ReportController@store');

    //banner
    $route->get('banner/index', 'BannerController@index')->name('admin.banner.index');
    $route->get('banner/info', 'BannerController@info')->name('admin.banner.info');
    $route->post('banner/store', 'BannerController@store')->name('admin.banner.store');
    $route->post('banner/destroy', 'BannerController@destroy')->name('admin.banner.destroy');

    //comment
    $route->any('comment/index', 'CommentController@index');
    $route->any('comment/destroy', 'CommentController@destroy');

    //star
    $route->any('star/index', 'StarController@index');

    //focus
    $route->any('focus/index', 'FocusController@index');

    //notification
    $route->any('notify/index', 'NotificationController@index');
    $route->any('notify/create', 'NotificationController@store');
    $route->any('notify/send', 'NotificationController@send');

    //品种识别
    $route->any('animal/cat/match', 'AnimalCatMatchController@index');

    //homepage-dialog
    $route->get('dialog/index', 'HomepageDialogController@index');
    $route->get('dialog/info', 'HomepageDialogController@info');
    $route->post('dialog/store', 'HomepageDialogController@store');
    $route->post('dialog/destroy', 'HomepageDialogController@destroy');

    //product
    $route->get('product/index', 'ProductController@index');
    $route->get('product/info', 'ProductController@info');
    $route->post('product/store', 'ProductController@store');
    $route->post('product/destroy', 'ProductController@destroy');


    $route->any('express/index', 'ExpressController@index');
    $route->any('balance/index', 'BalanceController@index');

    $route->any('order/delivery', 'OrderController@delivery');
    $route->any('order/index', 'OrderController@index');

    $route->any('voice/translate/index', 'VoiceTranslateController@index');

});


